import math
def more_zero(a,less):
    for i in range(0,less+1):
        a.insert(0,0)
    return len(a)

def add(a,b):
    less=abs(len(a)-len(b))
    long=0
    if(a>b):
        long=more_zero(b,less)
        a.insert(0,0)
    else:
        long=more_zero(a,less)
        b.insert(0,0)
    ans=[]
    for i in range(0,long): ans.append(0)
    print(ans)
    more=0
    for i in range(long-1,0,-1):
        an=int(a[i])+int(b[i])+more
        more=0
        if(an>=10):
            an-=10
            more+=1
        ans[i]=an
    ans[0]=more
    print(int(ans))

a,b=list(input()),list(input())
add(a,b)